diff options
author | Mike Buland <eichlan@xagasoft.com> | 2012-01-19 11:31:18 -0700 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2012-01-19 11:31:18 -0700 |
commit | 09eb0733854da12146570060e84f5f7b4203e1bc (patch) | |
tree | 217986bff60af512c87688aa3309cf81ac3b4a1f | |
parent | 3232d0069421a1585e7e42f503c1ed7b1910891c (diff) | |
download | stage-09eb0733854da12146570060e84f5f7b4203e1bc.tar.gz stage-09eb0733854da12146570060e84f5f7b4203e1bc.tar.bz2 stage-09eb0733854da12146570060e84f5f7b4203e1bc.tar.xz stage-09eb0733854da12146570060e84f5f7b4203e1bc.zip |
Added gats, verified in linux and win32.
-rw-r--r-- | default.bld | 4 | ||||
-rw-r--r-- | mingw.bld | 8 | ||||
-rw-r--r-- | src/gamestate.cpp | 9 | ||||
-rw-r--r-- | src/gamestate.h | 7 |
4 files changed, 23 insertions, 5 deletions
diff --git a/default.bld b/default.bld index 2747296..3a5453a 100644 --- a/default.bld +++ b/default.bld | |||
@@ -47,13 +47,13 @@ target "stage" | |||
47 | rule "exe"; | 47 | rule "exe"; |
48 | input files("src/*.y", "src/*.l", "src/*.cpp", "src/version.h"); | 48 | input files("src/*.y", "src/*.l", "src/*.cpp", "src/version.h"); |
49 | 49 | ||
50 | CXXFLAGS="-ggdb"; | 50 | CXXFLAGS="-ggdb -Ilibgats"; |
51 | CFLAGS="-ggdb"; | 51 | CFLAGS="-ggdb"; |
52 | 52 | ||
53 | FLEXFLAGS="-osrc/parser.yy.c --header-file=src/parser.yy.h"; | 53 | FLEXFLAGS="-osrc/parser.yy.c --header-file=src/parser.yy.h"; |
54 | BISONFLAGS="-d"; | 54 | BISONFLAGS="-d"; |
55 | 55 | ||
56 | LDFLAGS += "-lbu++ -ldl"; | 56 | LDFLAGS += "-lbu++ -ldl -Llibgats -lgats"; |
57 | } | 57 | } |
58 | 58 | ||
59 | /* | 59 | /* |
@@ -22,10 +22,11 @@ action "clean" | |||
22 | clean: targets(); | 22 | clean: targets(); |
23 | } | 23 | } |
24 | 24 | ||
25 | ZIPFILE = "stage-$(git describe).zip"; | 25 | ZIPFILE = "stage-win32-$(git describe).zip"; |
26 | ZIPINPUT = [ | 26 | ZIPINPUT = [ |
27 | "stage.exe", | 27 | "stage.exe", |
28 | "bloodfields.stage", | 28 | "bloodfields.stage", |
29 | "demo.stage", | ||
29 | "libgcc_s_dw2-1.dll", | 30 | "libgcc_s_dw2-1.dll", |
30 | "libstdc++-6.dll", | 31 | "libstdc++-6.dll", |
31 | "stage.txt" | 32 | "stage.txt" |
@@ -42,6 +43,7 @@ target ZIPFILE | |||
42 | { | 43 | { |
43 | profile "build" | 44 | profile "build" |
44 | { | 45 | { |
46 | execute("wine strip --strip-all stage.exe"); | ||
45 | execute("zip -9 ${ZIPFILE} ${ZIPINPUT}"); | 47 | execute("zip -9 ${ZIPFILE} ${ZIPINPUT}"); |
46 | } | 48 | } |
47 | } | 49 | } |
@@ -54,9 +56,9 @@ target "stage.exe" | |||
54 | ]; | 56 | ]; |
55 | rule "winexe"; | 57 | rule "winexe"; |
56 | 58 | ||
57 | CXXFLAGS += "-O2 -frtti -fexceptions -Wall -Ilibbu++/support/windows -Isrc"; | 59 | CXXFLAGS += "-O2 -frtti -fexceptions -Wall -Ilibbu++/support/windows -Isrc -Ilibgats"; |
58 | 60 | ||
59 | LDFLAGS += "-enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -mthreads -Wl -lmingw32 -Llibbu++ -lbu++win -Llibbu++/support/windows -lbz2 -Wl,-subsystem,console"; | 61 | LDFLAGS += "-enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -mthreads -Wl -lmingw32 -Llibbu++ -lbu++win -Llibbu++/support/windows -lbz2 -Wl,-subsystem,console -Llibgats -lgatswin"; |
60 | 62 | ||
61 | CXXFLAGS += "-Ilibbu++"; | 63 | CXXFLAGS += "-Ilibbu++"; |
62 | } | 64 | } |
diff --git a/src/gamestate.cpp b/src/gamestate.cpp index 0b721d4..b87f658 100644 --- a/src/gamestate.cpp +++ b/src/gamestate.cpp | |||
@@ -5,6 +5,8 @@ | |||
5 | #include "astleaf.h" | 5 | #include "astleaf.h" |
6 | #include "astleafliteral.h" | 6 | #include "astleafliteral.h" |
7 | 7 | ||
8 | #include <gats/types.h> | ||
9 | |||
8 | #include <bu/sio.h> | 10 | #include <bu/sio.h> |
9 | using namespace Bu; | 11 | using namespace Bu; |
10 | 12 | ||
@@ -20,6 +22,13 @@ GameState::~GameState() | |||
20 | { | 22 | { |
21 | } | 23 | } |
22 | 24 | ||
25 | Gats::Object *GameState::toGats() const | ||
26 | { | ||
27 | Gats::Dictionary *pRoot = new Gats::Dictionary; | ||
28 | |||
29 | Gats::Dictionary *pSit = pRoot->insertDict("situations"); | ||
30 | } | ||
31 | |||
23 | void GameState::parse( class AstBranch *pAst ) | 32 | void GameState::parse( class AstBranch *pAst ) |
24 | { | 33 | { |
25 | if( pAst->getType() != AstNode::tScope ) | 34 | if( pAst->getType() != AstNode::tScope ) |
diff --git a/src/gamestate.h b/src/gamestate.h index e139dfe..1d6d491 100644 --- a/src/gamestate.h +++ b/src/gamestate.h | |||
@@ -9,12 +9,19 @@ | |||
9 | class Game; | 9 | class Game; |
10 | class Interface; | 10 | class Interface; |
11 | 11 | ||
12 | namespace Gats | ||
13 | { | ||
14 | class Object; | ||
15 | } | ||
16 | |||
12 | class GameState | 17 | class GameState |
13 | { | 18 | { |
14 | public: | 19 | public: |
15 | GameState( Game *pGame, Interface *pIface ); | 20 | GameState( Game *pGame, Interface *pIface ); |
16 | virtual ~GameState(); | 21 | virtual ~GameState(); |
17 | 22 | ||
23 | Gats::Object *toGats() const; | ||
24 | |||
18 | Interface *getInterface() { return pIface; } | 25 | Interface *getInterface() { return pIface; } |
19 | 26 | ||
20 | void parse( class AstBranch *pAst ); | 27 | void parse( class AstBranch *pAst ); |